import React from "react";
import PropTypes from "prop-types";
import { Button } from "@ali/ding-ui";

import { close } from "../../utils/dingtalk";

function backTohome() {
  close();
}
const PreEntry = props => {
  const { companyLogo, companyName ,hasLogo} = props;
  return (
    <div className="pre-entry">
      <div className="finish-backgroud" />
      
      <div className="preEnter-desc">
        <div>提交成功</div>
        <div>期待你的到来</div>
      </div>
      <div className="finish-text preEnter-text">
        {
          hasLogo ? <img className="finish-logo" src={companyLogo} /> :
            <div className="finish-logo" >{companyName ? companyName.substring(0, 1) : ""}</div>
        }
        {companyName}
        
      </div>
      <Button
        className="finish-btn preEnter-btn"
        type="primary"
        onClick={backTohome}
      >
        完成
      </Button>
      {/* <div className="finish-text_bottom">如有问题，请联系HR</div> */}
    </div>
  );
};
PreEntry.propTypes = {
  companyLogo: PropTypes.string,
  companyName: PropTypes.string,
  hasLogo: PropTypes.bool
};
export default PreEntry;
